
/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2006</p>
 * <p>CreateTime: 2006-4-6 </p>
 * @author pengz
 * @version 1.0
 */


package cn.agiledata.bank.myspace.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;

public class MailActionForm extends ActionForm{
private String email ;

public String getEmail() {
	return email;
}

public void setEmail(String email) {
	this.email = email;

}

public ActionErrors validate(ActionMapping mapping,
        HttpServletRequest request) {
	ActionErrors errors =new ActionErrors();
	ActionMessages am = new ActionMessages();
	ActionMessage amm = new ActionMessage("mail is whrong");
	//ae.add("rong",am.add("mail",amm));
	System.err.println("mail is rong "+email);
	if(email==null||email.length()==0) {
		//ae.add("mail is wrong!","");
		//ae.
		errors.add(ActionErrors.GLOBAL_MESSAGE,amm);
		System.err.println("mail is rong ");
		errors.add("mailerrors",amm);
	}
return (errors);

}

protected boolean checkEmail (String emailValue, String fieldName) {
return false;
}
}
